Release 10.1A: OpenEdge Development:
Open Client Introduction and Programming
Example
An OpenEdge developer at company ABCPets designs and develops an inventory system for pet shops, using the AppBuilder (
.wfiles). These source files are in the directoryc:\ABCPets\Source\Inventory. The files are compiled, and the r-code files are placed inc:\ABCPets\Bin\Inventory. ABCPets wants to package this functionality for Java clients. You run ProxyGen and supply the following information:You customize the method definition for
AddInventory()to disable the use of objects for passing the 4GL Unknown value (?) in either parameter. You also explicitly excludeValidateInventory(). Note that the internal procedureUpdateInternals()is defined with thePRIVATEkeyword and does not appear in ProxyGen as a procedure to include or customize.When you choose the Generate button, you supply the following information:
Proxy generation places the Java proxy (the
.classfiles) intoc:\Proxies\com\ABCPets, and creates the activity log asc:\Proxies\Inventory.log. The generated Java files include:You then change
p-Cust.wbut do not change the signature ofAddInventory()(AddInventory(INTEGER, INTEGER)). You add new internal procedures to the persistent procedurep-Cust.w. These changes only require you to run ProxyGen to regenerate the proxy as long as you want them included. New non-PRIVATEinternal procedures are added as methods automatically, with default definitions. To exclude them, you must run ProxyGen and customize the persistent procedure definition. Also, any changes in or the removal ofValidateInventory()do not cause validation errors because it is excluded from the proxy definition and is not validated.You decide to run Batch ProxyGen as part of a regular build cycle, so any similar changes in the 4GL are picked up automatically.
Later in the development cycle, you add a new procedure file for inventory, called
Orders.w. This procedure file is saved inc:\ABCPets\Source\Inventory,and the r-code file is placed inc:\ABCPets\Bin\Inventory. You then run ProxyGen before the scheduled build and add this procedure file to theInventoryAppObject.You make another change to the
AddInventory()procedure, which now takes a third parameter (CHARACTER). Because this is a new parameter, it automatically gets the default (AppObject) setting to enable access to 4GL Unknown value (?). If you want to disable access to the 4GL Unknown value (?) by eliminating support for using objects as parameters and instead using equivalent intrinsic types (where available in the language), you must run ProxyGen before the scheduled build and update the customizations for this procedure.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |